/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2302 - For5
 * <p>Powered by webrx On 2023-06-12 17:26:55
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class For5 {
    public static void main(String[] args) {
        int s = 20;

        for (int i = 1; i < 20; i += 2) {
            //System.out.println(" ".repeat(s--) + "*".repeat(i));
            //System.out.println("*".repeat(i));

            s--;

            for(int a=1;a<s;a++){
                System.out.print(" ");
            }


            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

        for (int i = 17; i >0; i -= 2) {
            s++;
            for(int a=1;a<s;a++){
                System.out.print(" ");
            }
            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
